﻿// JScript File

function getCoords() {
        var scrollX, scrollY;
        
        if(document.all) {
            if(document.documentElement.scrollLeft)
                scrollX = document.documentElement.scrollLeft;
            else
                scrollX = document.body.scrollLeft;
            
            if(document.documentElement.scrollTop)
                scrollY = document.documentElement.scrollTop;
            else
                scrollY = document.body.scrollTop;
        }
        else {
            scrollX = window.PageXOffset;
            scrollY = window.PageYOffset;
        }
        
        document.forms[0].scrollLeft.value = scrollX;
        document.forms[0].scrollTop.value = scrollY;
    }

    function setScrollCoords() {
        window.scrollTo(document.forms[0].scrollLeft.value, document.forms[0].scrollTop.value);
    }

    window.setInterval('getCoords()', 1000);